import axios from '@/utils/request'
// 获取部门
export const prople = () => {
  return axios({
    url: '/company/department'
  })
}

// 删除部门
export function delDepartment(id) {
  return axios({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

// 新增部门
export function addDepartment(data) {
  return axios({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 根据id获取部门详情
export const getdeta = (id) => {
  return axios({
    url: `/company/department/${id}`
  })
}

// 根据id修改部门
export const updeta = (data) => {
  return axios({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
